The present invention relates to virtual machine systems and, more specifically, to obtaining faulting instructions by a hypervisor in a virtual machine system.
In many environments, such as servers, desktops, and even embedded systems, virtualization technologies have become increasingly prevalent. Virtualization technologies provide a variety of benefits, including IT optimization, flexible resource management and so on. Generally speaking, virtualization is a broad concept, which is usually related to the partition of real (physical) data processing resources, i.e., making a single data processing resource, such as a server, data storage, operating system or application to seem to act as multiple logical or virtual resources. This concept is wide enough such that it also includes the aggregation of the real data processor resources, i.e., making a plurality of physical resources, such as a server or data storage to seem to be a single logical resource. In a virtualized environment, a hypervisor or a virtual machine monitor (VMM) is running between operating systems of the hardware and the virtual machine. The hypervisor plays an important role in the management of virtual machine software implementation and the share of host hardware resources and so on. A function of the hypervisor is to identify the reason of exception interrupt and perform corresponding processing when the hardware sends out an exception interrupt, for example, to emulate the instruction from the virtual machine that causes the exception interrupt, that is, the faulting instruction. Therefore, the hypervisor firstly needs to locate to the faulting instruction. In the prior art, the hypervisor locates a faulting instruction by address mapping in different address space. It is not efficient in this manner.